home *** CD-ROM | disk | FTP | other *** search
- GraphVGA Unit Revision 1.0
- Shareware Release
-
- BGI and Borland Graphical Interface are registered trademarks of
- Borland International, Inc.
-
- (c) Copyright 1991 Modern Solutions. All rights reserved.
-
- Modern Solutions P.O. Box 55721, Hayward, California 94545
-
- INTRODUCTION
- ************
-
- SHAREWARE
- *********
-
- GraphVGA has been released under shareware concepts. This enables users
- of Turbo Pascal to use GraphVGA within their software without any initial
- cost incurred.
-
- Shareware software is not considered free. You are, however, encouraged
- to use this software as often as you like. Once you are satisfied with the
- product and its capabilities, it is recommended that the program is registered.
- Registration entitles users to an official registered copy of the GraphVGA
- unit and the accompanying documentation. Registered users also will be kept
- up to date on latest releases and updates and are entitled to using Modern
- Solutions's software support line.
-
- Once registered, the registered user is entitled to use GraphVGA as often
- as he or she likes within their programs, whether commerical or not, as long as
- it is not distributed as a 'stand alone' product.
-
- To register the GraphVGA unit, send a check or money order for $35.00 +
- $2.50 ( Shipping & Handling ) with the registration form. ( No C.O.D. please. )
-
- The registration form is included with the GraphVGA unit files.
- To print the registration form, run the REGISTER batch file from the DOS
- prompt. ( For more information on running batch files, see your DOS manual. )
-
- DISCLAIMER
- **********
-
- Modern Solutions makes no warranties, neither expressed nor implied
- pertaining to this software. If you choose to use this software, you do
- so at your own risk, and Modern Solutions is not obligated for any personal
- loss incurred by the usage of this software.
-
- Permission is hereby granted to distribute this software under shareware
- concepts as long as this documentation accompanies it. This software may not
- be distributed for profit other than the single-disk asking price of a
- shareware distributor used to cover duplication and distribution costs, not to
- exceed $10 under any circumstances. Modern Solutions reserves all rights to
- the software and accompanying documentation.
-
- GRAPHVGA
- ********
-
- GraphVGA is a set of high performance graphic routines for EGA or VGA
- programmers that can be used to replace or supplement Borland's Graphical
- Interface. GraphVGA was created to give programmers an alternative to calling
- BGI routines.
-
- THE GRAPHVGA UNIT
- *****************
-
- procedure SetVideoMode(number:byte);
-
- Sets the appropriate graphics video mode. The following video modes
- will work properly with the GraphVGA system :
-
- Resolution Adapter SetVideoMode
-
- 320 x 200 x 16 EGA/VGA $0D
- 640 x 200 x 16 EGA/VGA $0E
- 640 x 350 x 16 EGA/VGA $10
- 640 x 480 x 16 VGA $12
-
- function GetVideoMode:integer;
-
- Gets the current video mode. See SetVideoMode above.
-
- function CharacterHeight:word;
-
- Returns the height of the current character matrix.
-
- By default DOS will setup the most appropriate font for the given
- video mode. This value will represent the number of pixels that
- make up the height of each character.
-
- This value can be reprogrammed with the GraphVGA command ScreenFont.
- See ScreenFont command below.
-
- function EGApresent:boolean;
-
- Determines whether an EGA compatible adapter is available.
-
- function EGAmemory:integer;
-
- Returns the amount of memory available on your EGA compatible adapter.
-
- procedure FastLine(x1,y1,x2,y2,number:integer);
-
- Draws a FastLine from x1,y1 to x2,y2 with the color specified by number.
-
- function FastGetPixel(x1,y1:integer):integer;
-
- Gets the color value of the pixel at location x1,y1.
-
- procedure FastPutPixel(x1,y1,number:integer);
-
- Sets the color value of the pixel at x1,y1 to the color specified by
- number.
-
- procedure FastGetBlock(x1,y1,x2,y2:integer;storage:pointer);
-
- Copies a block of video memory from x1,y1 to x2,y2 to ram. This
- command is useful for block animation and other special effects.
-
- The variable storage must be a pointer to a variable that is large
- enough to handle the block. To determine the physical size of the
- block use the following equation :
-
- ByteSize=(INT((X2-X1)/8+1))*(Y2-Y1+1)*4+5
-
- procedure FastPutBlock(x1,y1:integer;storage:pointer);
-
- Copies a block of memory pointed to by storage to the video screen
- starting at position x1,y1. This command is the complement to
- FastGetBlock. See FastGetBlock above.
-
- procedure FastChar(c1:char;x1,y1,f1,b1:integer);
-
- Places a DOS compatible character on the video screen at the location
- specified by x1,y1 and using the colors f1,b1 for foreground and
- background.
-
- FastChar use the character set initialized by SetVideoMode or the
- character set reinitialized by the GraphVGA command ScreenFont.
-
- procedure FastMode(mode:integer);
-
- FastMode sets the drawing method of all of the GraphVGA routines.
-
- The method by which all graphics routines, including character
- routines, write to video screen can be altered by the FastMode command.
-
- The possible options are as follows :
-
- fastreplace
- fastand
- fastor
- fastxor
-
- The above are constants that are within the GraphVGA unit's interface
- section.
-
- procedure FastColor(number,value:integer);
-
- Redefines the basic color palette by changing the normal color
- specified by number to the new color specified by value.
-
- procedure FastCircle(xc,yc,major,minor,number:integer);
-
- Draws an ellipse with xc,yc as the centerpoint. Major and minor
- determine the radius of the X and Y axis. Number specifies the color
- to use when drawing the ellipse.
-
- procedure ScreenStart(x1,y1:integer);
-
- ScreenStart redefines the origin of the screen within the video buffer.
- All subsequent GraphVGA commands are relative to the value specified
- with the ScreenStart command.
-
- ScreenStart is useful to produce a panning or smooth movement effect
- with the video buffer.
-
- procedure ScreenSize(x1,y1:integer);
-
- ScreenSize will redefine the physical boundaries of the video buffer.
- This is usually used in conjunction with ScreenStart.
-
- All subsequent GraphVGA commands can treat the physical video buffer as
- defined by ScreenSize. For example :
-
- ScreenSize(1280,350);
-
- Redefines the buffer to become twice as wide. The video
- display will not change unless a ScreenStart command is issued.
-
- FastLine(0,0,1280,350);
-
- Draws a line diagonally across the video buffer.
-
- To determine just how large your video buffer can be, compare the
- value returned by the GraphVGA command EGAmemory with the following
- equation :
-
- ByteSize=((X2-X1+1)/8)*(Y2-Y1+1)*4
-
- If ByteSize is greater than EGAmemory, then you will need to reduce the
- ScreenSize parameters.
-
- procedure ScreenBorder(number:integer);
-
- Changes the border color of the video screen.
-
- procedure ScreenFont(font:pointer;height:word);
-
- Redefines the DOS graphics character set.
-
- When the SetVideoMode command is issued, DOS automatically defines
- the default font. Once the SetVideoMode command is issued, you can
- redefine this default font with the ScreenFont command.
-
- Font is a pointer to a valid DOS font replacement. Height specifies
- the number of pixels in the height of the new font.
-
- In order to produce a font the size of 80 by 25 characters DOS will
- determine the Y resolution of the video buffer and then divide that
- amount by 25. This value is the value returned by the GraphVGA
- routine CharacterHeight. For example :
-
- 350 / 25 = 14 ( EGA 350 line mode )
-
- If the CharacterHeight of the 350 line mode was 8 then you would
- create an 80 by 43 line mode. You can accomplish this with the
- following command :
-
- ScreenFont(@Font8x8,8);
-
- Make sure you use the unit entitled 'VGAfonts' that is included with
- the GraphVGA files. This command will reprogram the video system to
- create an 80 by 43 line mode that will work the GraphVGA command
- FastChar.
-
- Likewise, this applies to VGA modes as well, like the 640 by 480 mode.
- By using the same command as above, you will create a 80 by 60 character
- mode.
-
- Remember, unlike DOS, you can use FastChar to write characters outside
- of the visible video buffer. This holds true for all GraphVGA routines.
- It is a good practice to retrieve the video mode using GetVideoMode
- before altering the DOS fonts and then SetVideoMode before terminating
- your program.
-
- function Joybutton(sticknumber,buttonnumber:integer):boolean;
-
- Returns the current state of the joystick button specified by the
- value sticknumber and the button value buttonnumber.
-
- procedure Joystick(sticknumber:integer;var x,y:integer);
-
- Returns the current location of the joystick specified by the value
- sticknumber and places the result within the variables x and y.
-
-
-
- ----------------end-of-author's-documentation---------------
-
- Software Library Information:
-
- This disk copy provided as a service of
-
- Public (software) Library
-
- We are not the authors of this program, nor are we associated
- with the author in any way other than as a distributor of the
- program in accordance with the author's terms of distribution.
-
- Please direct shareware payments and specific questions about
- this program to the author of the program, whose name appears
- elsewhere in this documentation. If you have trouble getting
- in touch with the author, we will do whatever we can to help
- you with your questions. All programs have been tested and do
- run. To report problems, please use the form that is in the
- file PROBLEM.DOC on many of our disks or in other written for-
- mat with screen printouts, if possible. PsL cannot debug pro-
- programs over the telephone, though we can answer questions.
-
- Disks in the PsL are updated monthly, so if you did not get
- this disk directly from the PsL, you should be aware that the
- files in this set may no longer be the current versions. Also,
- if you got this disk from another vendor and are having prob-
- lems, be aware that some files may have become corrupted or
- lost by that vendor. Get a current, working disk from PsL.
-
- For a copy of the latest monthly software library newsletter
- and a list of the 3,000+ disks in the library, call or write
-
- Public (software) Library
- P.O.Box 35705 - F
- Houston, TX 77235-5705
-
- 1-800-2424-PSL
- MC/Visa/AmEx/Discover
-
- Outside of U.S. or in Texas
- or for general information,
- Call 1-713-524-6394
-
- PsL also has an outstanding
- catalog for the Macintosh.
-